//package netty.netty5;
//
//import io.netty.buffer.ByteBuf;
//import io.netty.channel.ChannelHandlerAdapter;
//import io.netty.channel.ChannelHandlerContext;
//import io.netty.util.ReferenceCountUtil;
//
///**
// * Created by IntelliJ IDEA.
// * User: liuliwei
// * Date: 2017-06-01
// * Time: 下午5:08
// * Description: 处理服务器端通道
// */
//public class DiscardServerHandler extends ChannelHandlerAdapter{
//    @Override
//    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//        ctx.write(msg);
//        ctx.flush();
//        //相当于上面两句
////        ctx.writeAndFlush(msg);
//    }
//
//    @Override
//    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
//        super.exceptionCaught(ctx, cause);
//        ctx.close();
//    }
//}
